<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="/assets/activity/disc/js/jquery.js"></script>
<body>
<div id="a">
    请输入签到码<input type="text" size="20" id="code">
    <button id="submit">提交</button>
</div>
<div id="b" style="display: none;">
    <span>提示</span>
    <button id="reload">重新输入</button>
</div>
</body>
<script type="text/javascript">
    $('#submit').click(function(){
        if (!$('#code').val()){
            alert("请输入签到码！");
            return false;
        }
        $.ajax({
            url: '/meeting/MeetingEnrollCopy/doSign',
            type: 'POST',
            data: {'code': $('#code').val()},
            dataType: 'json',
            success:function (data) {
                $('#b span').text(data.message);
                $('#a').hide();
                $('#b').show();
            }
        });
    });

    $('#reload').click(function(){
        $('#code').val('');
        $('#b').hide();
        $('#a').show();
    });
</script>
</html>